<!DOCTYPE html>  
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <meta name="viewport" content="width=device-width, initial-scale=1.0">  
    <title>Upload Success Popup</title>  
    <style>
      body {  
          font-family: Arial, sans-serif;  
      }  
        
      #uploadButton {  
          padding: 10px 20px;  
          font-size: 16px;  
          cursor: pointer;  
      }  
        
      .popup {  
          display: none; /* Initially hidden */  
          position: fixed;  
          z-index: 1;  
          left: 0;  
          top: 0;  
          width: 100%;  
          height: 100%;  
          overflow: auto;  
          background-color: rgb(0,0,0);  
          background-color: rgba(0,0,0,0.4); /* Black with opacity */  
      }  
        
      .popup-content {  
          background-color: #fefefe;  
          margin: 15% auto; /* 15% from the top and centered */  
          padding: 20px;  
          border: 1px solid #888;  
          width: 80%; /* Could be more or less, depending on screen size */  
          max-width: 600px;  
          text-align: center;  
          box-shadow: 0 5px 15px rgba(0,0,0,0.3);  
          border-radius: 5px;  
      }  
        
      .close-button {  
          color: #aaa;  
          float: right;  
          font-size: 28px;  
          font-weight: bold;  
          cursor: pointer;  
      }  
        
      .close-button:hover,  
      .close-button:focus {  
          color: black;  
          text-decoration: none;  
          cursor: pointer;  
      }
    </style> 
</head>  
<body>  
    <button id="uploadButton">上传</button>  
  
    <div id="popup" class="popup">  
        <div class="popup-content">  
            <span class="close-button" id="confirmButton">&times;</span>  
            <p>上传成功！</p>  
        </div>  
    </div>  
  
</body>
<script>
    // 假设后端传回的JSON字符串是这样的  
const jsonString = '{"result":"error:文件已上传file has been uploaded"}';  
  
  // 使用JSON.parse()方法将JSON字符串解析为JavaScript对象  
  const jsonObject = JSON.parse(jsonString);  
    
  // 现在可以访问jsonObject的result属性了  
  const resultValue = jsonObject.result;  
    
  // 输出result属性的值到控制台  
  console.log(resultValue); // 输出：error:文件已上传file has been uploaded
</script>  
</html>